import hyRequest from '..'
import type { Icount } from '@/types'
// 账号登录
export function accountLogin(account: Icount) {
  return hyRequest.post({
    url: '/login',
    data: account,
  })
}

// 根据id获取用户信息
export function getInfoById(id: number) {
  return hyRequest.get({
    url: `/users/${id}`,
  })
}

// 根据用户的roleId查菜单权限
export function getUserMenusByRoleId(id: number) {
  return hyRequest.get({
    url: `/role/${id}/menu`,
  })
}
